package biz.obake.team.touchprotector.g;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;
import biz.obake.team.android.a;
import biz.obake.team.touchprotector.R;
import biz.obake.team.touchprotector.c;

public class e {

    /* renamed from: a  reason: collision with root package name */
    private static Toast f1715a;

    public static void a(int i) {
        b(c.w(i));
    }

    public static void b(String str) {
        Toast toast = f1715a;
        if (toast != null) {
            toast.cancel();
            f1715a = null;
        }
        View inflate = ((LayoutInflater) a.a().getSystemService("layout_inflater")).inflate(R.layout.toast_view, (ViewGroup) null);
        ((TextView) inflate.findViewById(R.id.toast_view_text)).setText(str);
        Toast toast2 = new Toast(a.a());
        f1715a = toast2;
        toast2.setDuration(1);
        f1715a.setGravity(17, 0, 0);
        f1715a.setView(inflate);
        f1715a.show();
    }

    public static void c() {
        StringBuilder sb = new StringBuilder(c.w(R.string.toast_protecting));
        sb.append("\n" + biz.obake.team.touchprotector.d.c.c());
        sb.append("\n" + c.w(R.string.toast_protecting_hiding_5times));
        b(sb.toString());
    }
}
